package com.vito.framework.system.group.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.vito.framework.base.model.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_group")
@ApiModel(value = "sys_group对象", description = "分组关系管理表")
public class GroupBean extends Entity<GroupBean> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @TableField("name")
    @ApiModelProperty("组名称")
    private String name;

    @TableField("parent_id")
    @ApiModelProperty("上级组")
    private String parentId;

    @TableField("type")
    @ApiModelProperty("组类型")
    private String type;

    @TableField("code")
    @ApiModelProperty("代码")
    private String code;

    @TableField("root_path")
    @ApiModelProperty("根路径")
    private String rootPath;

    @TableField("sort")
    @ApiModelProperty("排序")
    private String sort;

    @TableField(exist = false)
    @ApiModelProperty("子类")
    private List<?> children;
}
